var _n28;
var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2Hts = require("Hts");
var $2pvzChannel = require("pvzChannel");
var $2Ball = require("Ball");
var $2Boss = require("Boss");
var $2PlantBase = require("PlantBase");
var $2Zombie = require("Zombie");
var $2AudioManager = require("AudioManager");
var $2BundleManager = require("BundleManager");
var $2DataManager = require("DataManager");
var $2ExcelManager = require("ExcelManager");
var $2UIManager = require("UIManager");
var $2UserDataManager = require("UserDataManager");
var $2ZombieMgr = require("ZombieMgr");
var $2SceneStage = require("SceneStage");
var $2TaSdk = require("TaSdk");
var $2MyUtils = require("MyUtils");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_GuideUI2 = _n28 = /* */function (_cc$Component28) {
  babel_inherits(n, _cc$Component28);
  var _super31 = babel_createSuper(n);
  function n() {
    var _this65;
    babel_classCallCheck(this, n);
    _this65 = _super31.apply(this, arguments);
    _this65.step = 0;
    _this65.clickBall2 = false;
    _this65.clickBall3 = false;
    return _this65;
  }
  babel_createClass(n, [{
    key: "onLoad",
    value: function onLoad() {
      _n28._instance = this;
      this.guidePanel = this.node.getChildByName("GuidePanel");
      this.highLight = this.node.getChildByName("HighLight");
      this.finger = this.node.getChildByName("GuideFinger");
      this.block = this.node.getChildByName("Block");
      this.mask = this.node.getChildByName("Mask");
      this.boss = this.node.getChildByName("Boss").getComponent(sp.Skeleton);
      this.ball1 = this.node.getChildByName("plantBall1");
      this.ball2 = this.node.getChildByName("plantBall2");
      this.ball3 = this.node.getChildByName("plantBall3");
      this.ball4 = this.node.getChildByName("plantBall4");
      this.guideTable = $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.guideTable);
      this.node.on("init", this.init, this);
      this.node.on("nextStep", this.nextStep, this);
      window.high = this.highLight;
    }
  }, {
    key: "init",
    value: function init(e) {
      this.step = 0;
      this.type = e;
      this.nextStep();
    }
  }, {
    key: "guide1",
    value: function guide1() {
      var _this66 = this;
      switch (this.step) {
        case 1:
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 1
          });
          $2DataManager.default.instance.selectPlantID = [1, 21];
          $2SceneStage.default.instance.play();
          this.node.getChildByName("SkipBtn").active = true;
          $2Hts.default.instance.eventReport("进入新手体验关11111xxx");
          $2SceneStage.default.instance.node.getChildByName("PauseBtn").active = false;
          $2SceneStage.default.instance.node.getChildByName("shovelPanel").active = false;
          $2SceneStage.default.instance.cardPanel.x = -1e3;
          $2SceneStage.default.instance.plantPanel.x = -1e3;
          this.node.getChildByName("Boss").active = true;
          this.nextStep();
          break;
        case 2:
          this.scheduleOnce(function () {
            $2SceneStage.default.instance.cardPanel.x = -586;
            $2SceneStage.default.instance.plantPanel.x = -586;
            $2SceneStage.default.instance.cardPanel.children[0].x = -300;
            $2SceneStage.default.instance.plantPanel.children[0].x = -300;
            $2SceneStage.default.instance.cardPanel.children[1].x = -300;
            $2SceneStage.default.instance.plantPanel.children[1].x = -300;
            _this66.showToast(_this66.guideTable[2].res, _this66.guideTable[2].talk);
            $2TaSdk.default.instance.postEvent("Tutorial", {
              tutorial_step: 2
            });
            $2Hts.default.instance.eventReport("戴夫首次动画");
          }, 7);
          break;
        case 3:
          cc.tween($2SceneStage.default.instance.cardPanel.children[0]).to(1, {
            x: 0
          }).call(function () {
            _this66.nextStep();
          }).start();
          cc.tween($2SceneStage.default.instance.plantPanel.children[0]).to(1, {
            x: 0
          }).start();
          this.hideToast();
          break;
        case 4:
          $2SceneStage.default.instance.goldNums += 500;
          this.showHighLight(-585, 240, 120, 80);
          break;
        case 5:
          $2SceneStage.default.instance.cardPanel.children[0].getChildByName("HighLight").active = true;
          this.showHighLight(-320, 130, 81, 93);
          break;
        case 6:
          $2SceneStage.default.instance.goldNums -= 500;
          $2SceneStage.default.instance.cardPanel.children[0].getChildByName("HighLight").active = false;
          var _e30 = $2SceneStage.default.instance.plantPanel.children[0];
          for (var _s3 = 0; _s3 < 5; _s3++) {
            var _t19 = $2DataManager.default.instance.blockArr[_s3][0][0];
            var _a18 = cc.instantiate(_e30);
            _a18.parent = $2SceneStage.default.instance.groudNode;
            _a18.opacity = 255;
            _a18.setPosition(_t19);
            _a18.getComponent($2PlantBase.default).reset(1, false);
            _a18.getComponent($2PlantBase.default).play(_s3, 0);
            _a18.getChildByName("PlantEffect").active = true;
            $2DataManager.default.instance.blockArr[_s3][0][1] = _a18;
          }
          this.hideHighLight();
          this.nextStep();
          break;
        case 7:
          this.scheduleOnce(function () {
            _this66.showToast(_this66.guideTable[4].res, _this66.guideTable[4].talk);
            $2TaSdk.default.instance.postEvent("Tutorial", {
              tutorial_step: 3
            });
            $2Hts.default.instance.eventReport("引导种植坚果");
          }, $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].waveTime[0] + $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].bigGap[1] - 3);
          break;
        case 8:
          this.hideToast();
          cc.tween($2SceneStage.default.instance.cardPanel.children[1]).to(1, {
            x: 0
          }).call(function () {
            _this66.nextStep();
          }).start();
          cc.tween($2SceneStage.default.instance.plantPanel.children[1]).to(1, {
            x: 0
          }).start();
          break;
        case 9:
          $2SceneStage.default.instance.goldNums += 500;
          this.showHighLight(-585, 165, 120, 80);
          break;
        case 10:
          $2SceneStage.default.instance.cardPanel.children[1].getChildByName("HighLight").active = true;
          this.showHighLight(163.5, 130, 81, 93);
          break;
        case 11:
          $2SceneStage.default.instance.goldNums -= 500;
          $2SceneStage.default.instance.cardPanel.children[1].getChildByName("HighLight").active = false;
          var _t20 = $2SceneStage.default.instance.plantPanel.children[1];
          for (var _s4 = 0; _s4 < 5; _s4++) {
            var _e31 = $2DataManager.default.instance.blockArr[_s4][6][0];
            var _a19 = cc.instantiate(_t20);
            _a19.parent = $2SceneStage.default.instance.groudNode;
            _a19.opacity = 255;
            _a19.setPosition(_e31);
            _a19.getComponent($2PlantBase.default).reset(21);
            _a19.getComponent($2PlantBase.default).play(_s4, 6);
            _a19.getChildByName("PlantEffect").active = true;
            $2DataManager.default.instance.blockArr[_s4][6][1] = _a19;
          }
          this.hideHighLight();
          this.nextStep();
          break;
        case 12:
          this.boss.node.getComponent($2Boss.default).addBoss();
          this.scheduleOnce(function () {
            var e = $2SceneStage.default.instance.node.getChildByName("Begin").getComponent(sp.Skeleton).setAnimation(0, "boss", false);
            $2SceneStage.default.instance.node.getChildByName("Begin").getComponent(sp.Skeleton).setTrackEventListener(e, function (e, t) {
              "boss" == t.data.name && $2AudioManager.default.instance.playEffect("boss");
            });
            $2SceneStage.default.instance.node.getChildByName("Begin").getComponent(sp.Skeleton).setCompleteListener(function () {
              _this66.boss.node.x = 720;
              _this66.boss.setAnimation(0, "ruchang", false);
              _this66.boss.setCompleteListener(function () {
                _this66.boss.setCompleteListener(null);
                _this66.boss.setAnimation(0, "daiji", true);
                _this66.nextStep();
              });
              cc.tween(_this66.node.getChildByName("Born")).to(1, {
                opacity: 255
              }).call(function () {
                $2ZombieMgr.default.instance().newPos = true;
              }).start();
            });
          }, $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].waveTime[1] + $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].bigGap[2] - 3);
          break;
        case 13:
          this.showToast(this.guideTable[7].res, this.guideTable[7].talk);
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 4
          });
          $2Hts.default.instance.eventReport("Boss出现");
          break;
        case 14:
          this.showToast(this.guideTable[8].res, this.guideTable[8].talk, false);
          break;
        case 15:
          this.hideToast();
          this.boss.setAnimation(0, "houchebu", false);
          this.boss.setCompleteListener(function () {
            _this66.boss.node.y = 150;
            _this66.boss.setCompleteListener(function () {
              _this66.boss.setCompleteListener(null);
              _this66.boss.setAnimation(0, "daij2", false);
              _this66.scheduleOnce(function () {
                _this66.boss.setCompleteListener(function () {
                  _this66.boss.setCompleteListener(null);
                  _this66.boss.setAnimation(0, "daij2", false);
                  _this66.scheduleOnce(function () {
                    _this66.boss.setCompleteListener(function () {
                      _this66.boss.node.y = -45;
                      _this66.boss.setCompleteListener(function () {
                        _this66.boss.setCompleteListener(null);
                        _this66.boss.setAnimation(0, "daiji", true);
                      });
                      _this66.boss.setAnimation(0, "ruchang", false);
                    });
                    _this66.boss.setAnimation(0, "2chuhua", false);
                  }, 1);
                });
                _this66.scheduleOnce(function () {
                  for (var _e32 = 0; _e32 < $2DataManager.default.instance.row; _e32++) {
                    for (var _t21 = 0; _t21 < $2DataManager.default.instance.col; _t21++) {
                      $2DataManager.default.instance.blockArr[_e32][_t21][1] && $2DataManager.default.instance.blockArr[_e32][_t21][1].getComponent($2PlantBase.default) && $2DataManager.default.instance.blockArr[_e32][_t21][1].getComponent($2PlantBase.default).hurt(9999);
                    }
                  }
                  _this66.scheduleOnce(function () {
                    _this66.showToast(_this66.guideTable[9].res, _this66.guideTable[9].talk);
                  }, 1);
                }, .5);
                _this66.boss.setAnimation(0, "gongji", false);
              }, 1);
            });
            _this66.boss.setAnimation(0, "ruchang2", false);
          });
          break;
        case 16:
          this.hideToast();
          this.ball1.getComponent($2Ball.default).init(11);
          this.scheduleOnce(function () {
            cc.Tween.stopAllByTarget(_this66.ball1);
            _this66.showToast(_this66.guideTable[10].res, _this66.guideTable[10].talk);
          }, 5);
          break;
        case 17:
          this.hideToast();
          this.showHighLight(this.ball1.x, this.ball1.y + 40, 250, 250);
          break;
        case 18:
          this.ball1.getComponent($2Ball.default).onClick();
          this.hideHighLight();
          this.scheduleOnce(function () {
            _this66.showToast(_this66.guideTable[12].res, _this66.guideTable[12].talk);
            $2TaSdk.default.instance.postEvent("Tutorial", {
              tutorial_step: 5
            });
            $2Hts.default.instance.eventReport("种植豌豆少女");
          }, 1.5);
          break;
        case 19:
          this.hideToast();
          $2SceneStage.default.instance.goldNums += 1250;
          this.showHighLight(-585, 81, 120, 80);
          break;
        case 20:
          $2SceneStage.default.instance.cardPanel.children[2].getChildByName("HighLight").active = true;
          this.showHighLight(-320, 130, 81, 93);
          break;
        case 21:
          $2SceneStage.default.instance.goldNums -= 1250;
          $2SceneStage.default.instance.cardPanel.children[2].getChildByName("HighLight").active = false;
          var _a20 = $2SceneStage.default.instance.plantPanel.children[2];
          for (var _s5 = 0; _s5 < 5; _s5++) {
            var _e33 = $2DataManager.default.instance.blockArr[_s5][0][0];
            var _t22 = cc.instantiate(_a20);
            _t22.parent = $2SceneStage.default.instance.groudNode;
            _t22.opacity = 255;
            _t22.setPosition(_e33);
            _t22.getComponent($2PlantBase.default).reset(11, true);
            _t22.getComponent($2PlantBase.default).play(_s5, 0);
            _t22.getChildByName("PlantEffect").active = true;
            $2DataManager.default.instance.blockArr[_s5][0][1] = _t22;
          }
          this.hideHighLight();
          this.nextStep();
          break;
        case 22:
          this.scheduleOnce(function () {
            _this66.showToast(_this66.guideTable[14].res, _this66.guideTable[14].talk, false);
          }, $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].waveTime[2] + $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].bigGap[3] - 14);
          break;
        case 23:
          this.scheduleOnce(function () {
            _this66.showToast(_this66.guideTable[15].res, _this66.guideTable[15].talk, true);
          }, 3);
          this.hideToast();
          break;
        case 24:
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 6
          });
          $2Hts.default.instance.eventReport("种植激光少女");
          this.hideToast();
          this.ball2.getComponent($2Ball.default).init(22);
          this.ball3.getComponent($2Ball.default).init(18);
          this.scheduleOnce(function () {
            if (!_this66.clickBall2) {
              _this66.jianguoToast();
              _this66.ball2.getComponent($2Ball.default).onClick();
            }
          }, 6.5);
          this.scheduleOnce(function () {
            if (!_this66.clickBall3) {
              _this66.jiguangToast();
              _this66.ball3.getComponent($2Ball.default).onClick();
            }
          }, 6);
          break;
        case 25:
          cc.director.resume();
          this.hideToast();
          break;
        case 26:
          cc.director.resume();
          this.hideToast();
          this.scheduleOnce(function () {
            $2SceneStage.default.instance.goldNums += 2e3;
            _this66.showHighLight(-585, 0, 120, 80);
          }, 2);
          break;
        case 27:
          $2SceneStage.default.instance.cardPanel.children[3].getChildByName("HighLight").active = true;
          this.showHighLight(-239.5, 130, 81, 93);
          break;
        case 28:
          $2SceneStage.default.instance.cardPanel.children[3].getChildByName("HighLight").active = false;
          $2SceneStage.default.instance.goldNums -= 2e3;
          var _n29 = $2SceneStage.default.instance.plantPanel.children[3];
          for (var _s6 = 0; _s6 < 5; _s6++) {
            var _e34 = $2DataManager.default.instance.blockArr[_s6][1][0];
            var _t23 = cc.instantiate(_n29);
            _t23.parent = $2SceneStage.default.instance.groudNode;
            _t23.opacity = 255;
            _t23.setPosition(_e34);
            _t23.getComponent($2PlantBase.default).reset(18, true);
            _t23.getComponent($2PlantBase.default).play(_s6, 1);
            _t23.getChildByName("PlantEffect").active = true;
            $2DataManager.default.instance.blockArr[_s6][1][1] = _t23;
          }
          this.nextStep();
          break;
        case 29:
          $2SceneStage.default.instance.goldNums += 1e3;
          this.showHighLight(-585, -80, 120, 80);
          break;
        case 30:
          $2SceneStage.default.instance.cardPanel.children[4].getChildByName("HighLight").active = true;
          this.showHighLight(-78.5, 130, 81, 93);
          break;
        case 31:
          $2SceneStage.default.instance.goldNums -= 1e3;
          $2SceneStage.default.instance.cardPanel.children[4].getChildByName("HighLight").active = false;
          var _i11 = $2SceneStage.default.instance.plantPanel.children[4];
          for (var _s7 = 0; _s7 < 5; _s7++) {
            var _e35 = $2DataManager.default.instance.blockArr[_s7][3][0];
            var _t24 = cc.instantiate(_i11);
            _t24.parent = $2SceneStage.default.instance.groudNode;
            _t24.opacity = 255;
            _t24.setPosition(_e35);
            _t24.getComponent($2PlantBase.default).reset(22, true);
            _t24.getComponent($2PlantBase.default).play(_s7, 3);
            _t24.getChildByName("PlantEffect").active = true;
            $2DataManager.default.instance.blockArr[_s7][3][1] = _t24;
          }
          this.nextStep();
          this.hideHighLight();
          break;
        case 32:
          this.scheduleOnce(function () {
            _this66.showToast(_this66.guideTable[19].res, _this66.guideTable[19].talk, true);
          }, $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].waveTime[3] + $2ExcelManager.ExcelMgr.instance.GetExcelObject($2ExcelManager.TableName.levelTable)[0].bigGap[4] - 3);
          break;
        case 33:
          this.hideToast();
          this.ball4.getComponent($2Ball.default).init(20);
          this.scheduleOnce(function () {
            cc.director.pause();
            _this66.showToast(_this66.guideTable[20].res, _this66.guideTable[20].talk, true);
            $2TaSdk.default.instance.postEvent("Tutorial", {
              tutorial_step: 7
            });
            $2Hts.default.instance.eventReport("种植火焰花女皇");
            _this66.ball4.getComponent($2Ball.default).onClick();
          }, 5);
          break;
        case 34:
          cc.director.resume();
          this.hideToast();
          this.scheduleOnce(function () {
            $2SceneStage.default.instance.goldNums += 2500;
            _this66.showHighLight(-585, -160, 120, 80);
          }, 1.5);
          break;
        case 35:
          $2SceneStage.default.instance.cardPanel.children[5].getChildByName("HighLight").active = true;
          this.showHighLight(-159, 130, 81, 93);
          break;
        case 36:
          $2SceneStage.default.instance.goldNums -= 2500;
          $2SceneStage.default.instance.cardPanel.children[5].getChildByName("HighLight").active = false;
          var _o = $2SceneStage.default.instance.plantPanel.children[5];
          for (var _s8 = 0; _s8 < 5; _s8++) {
            var _e36 = $2DataManager.default.instance.blockArr[_s8][2][0];
            var _t25 = cc.instantiate(_o);
            _t25.parent = $2SceneStage.default.instance.groudNode;
            _t25.opacity = 255;
            _t25.setPosition(_e36);
            _t25.getComponent($2PlantBase.default).reset(20, true);
            _t25.getComponent($2PlantBase.default).play(_s8, 2);
            _t25.getChildByName("PlantEffect").active = true;
            $2DataManager.default.instance.blockArr[_s8][2][1] = _t25;
          }
          this.hideHighLight();
          break;
        case 37:
          this.scheduleOnce(function () {
            _this66.showToast(_this66.guideTable[22].res, _this66.guideTable[22].talk, false);
          }, 2);
          break;
        case 38:
          $2Hts.default.instance.eventReport("体验关结束");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 8
          });
          $2ZombieMgr.default.instance().newPos = false;
          this.hideToast();
          this.boss.setAnimation(0, "houchebu", false);
          this.boss.setCompleteListener(function () {
            _this66.scheduleOnce(function () {
              $2UIManager.default.instance.closeUI("MainUI");
              $2UIManager.default.instance.closeUI("GuideUI2");
              $2UIManager.default.instance.openUI("SuccessUI");
            }, 2);
          });
      }
    }
  }, {
    key: "skip",
    value: function skip() {
      $2ZombieMgr.default.instance().newPos = false;
      $2Hts.default.instance.eventReport("体验关结束");
      $2Hts.default.instance.eventReport("跳过体验关");
      $2TaSdk.default.instance.postEvent("Tutorial", {
        tutorial_step: 8
      });
      $2UIManager.default.instance.closeUI("MainUI");
      $2UIManager.default.instance.closeUI("GuideUI2");
      $2UIManager.default.instance.openUI("SuccessUI");
      $2pvzChannel.pvzChannel.instance().channel.indexOf("wx") >= 0 && $2pvzChannel.pvzChannel.instance().closeNative("nativeIcon");
    }
  }, {
    key: "stepGuide",
    value: function stepGuide() {
      var _this67 = this;
      if ($2pvzChannel.pvzChannel.instance().channel.indexOf("wx") >= 0 && $2pvzChannel.pvzChannel.instance().getCtrl("p6")) {
        $2pvzChannel.pvzChannel.instance().showVideo({
          sucCall() {
            _this67.skip();
          },
          failCall() {},
          endCall() {}
        });
      } else {
        this.skip();
      }
    }
  }, {
    key: "guide2",
    value: function guide2() {
      switch (this.step) {
        case 1:
          $2Hts.default.instance.eventReport("进入植物界面");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 9
          });
          this.showToast(this.guideTable[25].res, this.guideTable[25].talk);
          break;
        case 2:
          this.showToast(this.guideTable[26].res, this.guideTable[26].talk);
          break;
        case 3:
          this.hideToast();
          this.showHighLight(-358, -290, 150, 150);
          break;
        case 4:
          $2UIManager.default.instance.uiList.MenuUI.emit("onClickUpgradeBtn");
          this.showHighLight(343, -65, 150, 150);
          break;
        case 5:
          $2UIManager.default.instance.uiList.UpgradeUI.emit("onClickBuyBtn");
          $2UIManager.default.instance.uiList.UpgradeUI.emit("onClickBuyBtn");
          $2UIManager.default.instance.uiList.UpgradeUI.emit("onClickBuyBtn");
          $2Hts.default.instance.eventReport("点击升级按钮");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 10
          });
          this.hideHighLight();
          this.showToast(this.guideTable[29].res, this.guideTable[29].talk);
          break;
        case 6:
          this.hideToast();
          this.showHighLight(445, 245, 150, 150);
          break;
        case 7:
          $2UserDataManager.default.instance.upGradeGuide = true;
          $2UIManager.default.instance.closeUI("GuideUI2");
          $2UIManager.default.instance.uiList.UpgradeUI.emit("onClickCloseBtn");
          $2Hts.default.instance.eventReport("升级引导结束");
      }
    }
  }, {
    key: "guide3",
    value: function guide3() {
      switch (this.step) {
        case 1:
          $2DataManager.default.instance.selectPlantID = [1, 2, 21];
          this.showHighLight(0, 60, 150, 150);
          break;
        case 2:
          $2DataManager.default.instance.level = 2;
          $2UIManager.default.instance.openUI("MainUI");
          $2UIManager.default.instance.closeUI("MenuUI");
          $2Hts.default.instance.eventReport("进入第二关");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 11
          });
          this.hideHighLight();
          break;
        case 3:
          this.showToast(this.guideTable[32].res, this.guideTable[32].talk);
          break;
        case 4:
          this.hideToast();
          var _e37 = $2MyUtils.MyUtils.getValuePosInArr($2DataManager.default.instance.plantArray, 11);
          var _t26 = _e37 % 5 * 120 - 372;
          var _a21 = -22 - 74 * Math.floor(_e37 / 5);
          this.showHighLight(_t26, _a21, 120, 80);
          break;
        case 5:
          $2UIManager.default.instance.uiList.PrepareCards.emit("guideSelect");
          this.hideHighLight();
          this.showToast(this.guideTable[34].res, this.guideTable[34].talk);
          $2Hts.default.instance.eventReport("点击豌豆少女");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 12
          });
          break;
        case 6:
          this.hideToast();
          this.showHighLight(322, -255, 200, 100);
          break;
        case 7:
          $2UIManager.default.instance.closeUI("PrepareCards");
          $2SceneStage.default.instance.play();
          $2UIManager.default.instance.closeUI("GuideUI2");
          $2UserDataManager.default.instance.levelGuide = true;
          $2Hts.default.instance.eventReport("关卡引导结束");
      }
    }
  }, {
    key: "guide4",
    value: function guide4() {
      switch (this.step) {
        case 1:
          $2UserDataManager.default.instance.diamond += 40;
          this.showToast(this.guideTable[42].res, this.guideTable[42].talk);
          break;
        case 2:
          this.hideToast();
          this.showHighLight(-230, -290, 150, 150);
          break;
        case 3:
          $2Hts.default.instance.eventReport("进入抽奖");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 15
          });
          $2UIManager.default.instance.uiList.MenuUI.emit("onClickDrawBtn");
          this.hideHighLight();
          this.showToast(this.guideTable[44].res, this.guideTable[44].talk);
          break;
        case 4:
          this.hideToast();
          this.showHighLight(200, -255, 150, 150);
          break;
        case 5:
          $2UIManager.default.instance.uiList.DrawUI.emit("draw", "btn3");
          this.hideHighLight();
          break;
        case 6:
          this.showToast(this.guideTable[46].res, this.guideTable[46].talk);
          break;
        case 7:
          this.hideToast();
          this.showHighLight(-580, 300, 150, 150);
          break;
        case 8:
          $2DataManager.default.instance.drawGuide = false;
          $2UserDataManager.default.instance.drawGuide = true;
          $2UIManager.default.instance.closeUI("GuideUI2");
          $2UIManager.default.instance.uiList.DrawUI.emit("onClickCloseBtn");
          $2Hts.default.instance.eventReport("抽奖引导结束");
      }
    }
  }, {
    key: "guide5",
    value: function guide5() {
      switch (this.step) {
        case 1:
          this.showHighLight(-358, -290, 150, 150);
          break;
        case 2:
          $2Hts.default.instance.eventReport("第二次进入植物升级");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 16
          });
          $2UIManager.default.instance.uiList.MenuUI.emit("onClickUpgradeBtn");
          this.showHighLight(343, -65, 150, 150);
          break;
        case 3:
          $2Hts.default.instance.eventReport("第二次点击升级按钮");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 17
          });
          $2UIManager.default.instance.uiList.UpgradeUI.emit("onClickBuyBtn");
          this.hideHighLight();
          this.showToast(this.guideTable[50].res, this.guideTable[50].talk);
          break;
        case 4:
          this.showToast(this.guideTable[51].res, this.guideTable[51].talk);
          break;
        case 5:
          $2UserDataManager.default.instance.upGradeGuide2 = true;
          $2UIManager.default.instance.closeUI("GuideUI2");
          $2Hts.default.instance.eventReport("碎片升级引导结束");
      }
    }
  }, {
    key: "guide6",
    value: function guide6() {
      switch (this.step) {
        case 1:
          $2Hts.default.instance.eventReport("黄瓜炸弹引导");
          $2TaSdk.default.instance.postEvent("Tutorial", {
            tutorial_step: 13
          });
          this.showToast(this.guideTable[37].res, this.guideTable[37].talk);
          break;
        case 2:
          this.showToast(this.guideTable[38].res, this.guideTable[38].talk);
          break;
        case 3:
          $2SceneStage.default.instance.bombNums++;
          this.hideToast();
          $2SceneStage.default.instance.showBtn();
          this.showHighLight(-30, -290, 150, 150);
          break;
        case 4:
          this.hideHighLight();
          $2SceneStage.default.instance.onClickBomb();
          break;
        case 5:
          this.showToast(this.guideTable[40].res, this.guideTable[40].talk);
          break;
        case 6:
          this.hideToast();
          $2UserDataManager.default.instance.huangGuaGuide = true;
          $2UIManager.default.instance.closeUI("GuideUI2");
          $2Hts.default.instance.eventReport("黄瓜炸弹引导结束");
      }
    }
  }, {
    key: "nextStep",
    value: function nextStep() {
      this.step++;
      switch (this.type) {
        case 1:
          this.guide1();
          break;
        case 2:
          this.guide2();
          break;
        case 3:
          this.guide3();
          break;
        case 4:
          this.guide4();
          break;
        case 5:
          this.guide5();
          break;
        case 6:
          this.guide6();
      }
    }
  }, {
    key: "jiguangToast",
    value: function jiguangToast() {
      cc.director.pause();
      this.clickBall3 = true;
      this.showToast(this.guideTable[16].res, this.guideTable[16].talk, true);
    }
  }, {
    key: "jianguoToast",
    value: function jianguoToast() {
      cc.director.pause();
      this.clickBall2 = true;
      this.showToast(this.guideTable[17].res, this.guideTable[17].talk, true);
    }
  }, {
    key: "showToast",
    value: function showToast(e, t) {
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
      if (a) {
        this.guidePanel.x = -200;
        this.guidePanel.scaleY = 1;
        this.guidePanel.getChildByName("Label").scaleX = 1;
      } else {
        this.guidePanel.x = 200;
        this.guidePanel.scaleY = -1;
        this.guidePanel.getChildByName("Label").scaleX = -1;
      }
      this.mask.active = true;
      this.guidePanel.active = true;
      this.guidePanel.getComponentInChildren(cc.Label).string = t;
      switch (e) {
        case "戴夫":
          this.guidePanel.getComponentInChildren(cc.Sprite).spriteFrame = $2BundleManager.default.instance.getBundleRes("BundleTexture", "GuideUI/p5", cc.SpriteFrame);
          break;
        case "火焰花女皇":
          this.guidePanel.getComponentInChildren(cc.Sprite).spriteFrame = $2BundleManager.default.instance.getBundleRes("BundleTexture", "GuideUI/p2", cc.SpriteFrame);
          break;
        case "豌豆少女":
          this.guidePanel.getComponentInChildren(cc.Sprite).spriteFrame = $2BundleManager.default.instance.getBundleRes("BundleTexture", "GuideUI/p3", cc.SpriteFrame);
          break;
        case "僵尸博士":
          this.guidePanel.getComponentInChildren(cc.Sprite).spriteFrame = $2BundleManager.default.instance.getBundleRes("BundleTexture", "GuideUI/p4", cc.SpriteFrame);
          break;
        case "坚果少女":
          this.guidePanel.getComponentInChildren(cc.Sprite).spriteFrame = $2BundleManager.default.instance.getBundleRes("BundleTexture", "GuideUI/p5", cc.SpriteFrame);
          break;
        case "激光少女":
          this.guidePanel.getComponentInChildren(cc.Sprite).spriteFrame = $2BundleManager.default.instance.getBundleRes("BundleTexture", "GuideUI/p6", cc.SpriteFrame);
      }
      this.gamePause();
    }
  }, {
    key: "hideToast",
    value: function hideToast() {
      this.gameResume();
      this.mask.active = false;
      this.guidePanel.active = false;
    }
  }, {
    key: "showHighLight",
    value: function showHighLight(e, t) {
      var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 150;
      var _n30 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 150;
      this.mask.active = false;
      this.finger.active = true;
      this.highLight.active = true;
      this.highLight.x = e;
      this.highLight.y = t;
      this.highLight.width = a;
      this.highLight.height = _n30;
      this.finger.x = e;
      this.finger.y = t;
      this.block.active = true;
      this.gamePause();
    }
  }, {
    key: "hideHighLight",
    value: function hideHighLight() {
      this.gameResume();
      this.finger.active = false;
      this.highLight.active = false;
      this.block.active = false;
    }
  }, {
    key: "gamePause",
    value: function gamePause() {
      if (1 == this.type || 6 == this.type) {
        $2ZombieMgr.default.instance().isPlay = false;
        $2SceneStage.default.instance.isGuide = true;
        for (var _e38 = 0; _e38 < $2DataManager.default.instance.row; _e38++) {
          for (var _t27 = 0; _t27 < $2DataManager.default.instance.col; _t27++) {
            $2DataManager.default.instance.blockArr[_e38][_t27][1] && $2DataManager.default.instance.blockArr[_e38][_t27][1].getComponent($2PlantBase.default) && ($2DataManager.default.instance.blockArr[_e38][_t27][1].getComponent($2PlantBase.default).isPause = true);
          }
        }
        for (var _e39 = 0; _e39 < babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values()).length; _e39++) {
          if (babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e39].getComponent($2Zombie.default)) {
            babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e39].getComponent($2Zombie.default).time = 0;
            babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e39].getComponent($2Zombie.default).dragon.timeScale = 0;
            babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e39].node.getChildByName("zombie").getChildByName("Cat") && babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e39].node.getChildByName("zombie").getChildByName("Cat").active && (babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e39].node.getChildByName("zombie").getChildByName("Cat").getComponent(sp.Skeleton).timeScale = 0);
          }
        }
      }
    }
  }, {
    key: "gameResume",
    value: function gameResume() {
      if (1 == this.type || 6 == this.type) {
        $2ZombieMgr.default.instance().isPlay = true;
        $2SceneStage.default.instance.isGuide = false;
        for (var _e40 = 0; _e40 < $2DataManager.default.instance.row; _e40++) {
          for (var _t28 = 0; _t28 < $2DataManager.default.instance.col; _t28++) {
            $2DataManager.default.instance.blockArr[_e40][_t28][1] && $2DataManager.default.instance.blockArr[_e40][_t28][1].getComponent($2PlantBase.default) && ($2DataManager.default.instance.blockArr[_e40][_t28][1].getComponent($2PlantBase.default).isPause = false);
          }
        }
        for (var _e41 = 0; _e41 < babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values()).length; _e41++) {
          if (babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41] && babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].getComponent($2Zombie.default)) {
            babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].getComponent($2Zombie.default).time = 1;
            babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].getComponent($2Zombie.default).dragon.timeScale = 1;
          }
          babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].node.getChildByName("zombie") && babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].node.getChildByName("zombie").getChildByName("Cat") && babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].node.getChildByName("zombie").getChildByName("Cat").active && (babel_toConsumableArray($2ZombieMgr.default.instance().zombieSet.values())[_e41].node.getChildByName("zombie").getChildByName("Cat").getComponent(sp.Skeleton).timeScale = 1);
        }
      }
    }
  }], [{
    key: "instance",
    get() {
      return this._instance;
    }
  }]);
  return n;
}(cc.Component);
def_GuideUI2._instance = null;
def_GuideUI2 = _n28 = cc__decorate([ccp_ccclass], def_GuideUI2);
exports.default = def_GuideUI2;